Typically, an operating system includes a service manager capable of running multiple service processes. The operating system relies on a process identifier (process ID or PID) of a process to uniquely identify and manage the process. The PID can be written to a documented file location called “pidfile”, and a kernel of the operating system may look up the PID in the pidfile to communicate with the process (for example, to stop it). Sometimes, an application or a computer program associated with a process may terminate inadvertently (e.g., crash or restart). It is common for the pidfile to not be updated to reflect this new development and thus become stale. A stale pidfile may include the PID of the process, but the process itself may have been terminated. Further, when the process restarts, there may be a new PID assigned to the process by the operating system. This gives rise to a discrepancy between the actual PID of the process and the old PID maintained within the pidfile. Ultimately, the service manager is unable to control the process and thereby may require a manual intervention to clear the discrepancy.
Thus, to increase the efficient management of processes, there is a need for a service manager to identify and manage the processes without using PIDs.